Optimal. Leaf size=44 \[ a x+\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{\sqrt {c}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}+b x \tanh ^{-1}\left (c x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6021, 304, 209,
212} \begin {gather*} a x+\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{\sqrt {c}}+b x \tanh ^{-1}\left (c x^2\right )-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 212
Rule 304
Rule 6021
Rubi steps
\begin {align*} \int \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \, dx &=a x+b \int \tanh ^{-1}\left (c x^2\right ) \, dx\\ &=a x+b x \tanh ^{-1}\left (c x^2\right )-(2 b c) \int \frac {x^2}{1-c^2 x^4} \, dx\\ &=a x+b x \tanh ^{-1}\left (c x^2\right )-b \int \frac {1}{1-c x^2} \, dx+b \int \frac {1}{1+c x^2} \, dx\\ &=a x+\frac {b \tan ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}+b x \tanh ^{-1}\left (c x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 57, normalized size = 1.30 \begin {gather*} a x+b x \tanh ^{-1}\left (c x^2\right )+\frac {b \left (2 \text {ArcTan}\left (\sqrt {c} x\right )+\log \left (1-\sqrt {c} x\right )-\log \left (1+\sqrt {c} x\right )\right )}{2 \sqrt {c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 37, normalized size = 0.84
method | result | size |
default | \(a x +b x \arctanh \left (c \,x^{2}\right )+\frac {b \arctan \left (x \sqrt {c}\right )}{\sqrt {c}}-\frac {b \arctanh \left (x \sqrt {c}\right )}{\sqrt {c}}\) | \(37\) |
risch | \(a x +\frac {b x \ln \left (c \,x^{2}+1\right )}{2}-\frac {b x \ln \left (-c \,x^{2}+1\right )}{2}+\frac {b \sqrt {-c}\, \ln \left (c x +\sqrt {-c}\right )}{2 c}-\frac {b \sqrt {-c}\, \ln \left (-c x +\sqrt {-c}\right )}{2 c}+\frac {b \ln \left (1-x \sqrt {c}\right )}{2 \sqrt {c}}-\frac {b \ln \left (1+x \sqrt {c}\right )}{2 \sqrt {c}}\) | \(102\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 55, normalized size = 1.25 \begin {gather*} \frac {1}{2} \, {\left (c {\left (\frac {2 \, \arctan \left (\sqrt {c} x\right )}{c^{\frac {3}{2}}} + \frac {\log \left (\frac {c x - \sqrt {c}}{c x + \sqrt {c}}\right )}{c^{\frac {3}{2}}}\right )} + 2 \, x \operatorname {artanh}\left (c x^{2}\right )\right )} b + a x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 84 vs.
\(2 (36) = 72\).
time = 0.42, size = 160, normalized size = 3.64 \begin {gather*} \left [\frac {b c x \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c x + 2 \, b \sqrt {c} \arctan \left (\sqrt {c} x\right ) + b \sqrt {c} \log \left (\frac {c x^{2} - 2 \, \sqrt {c} x + 1}{c x^{2} - 1}\right )}{2 \, c}, \frac {b c x \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c x + 2 \, b \sqrt {-c} \arctan \left (\sqrt {-c} x\right ) - b \sqrt {-c} \log \left (\frac {c x^{2} - 2 \, \sqrt {-c} x - 1}{c x^{2} + 1}\right )}{2 \, c}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 2.54, size = 702, normalized size = 15.95 \begin {gather*} a x + b \left (\begin {cases} \frac {4 c x \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} - \frac {c \left (- \frac {1}{c}\right )^{\frac {3}{2}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} + \frac {c \left (\frac {1}{c}\right )^{\frac {3}{2}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} - \frac {2 \sqrt {- \frac {1}{c}} \log {\left (x - \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} - \frac {3 \sqrt {- \frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} + \frac {4 \sqrt {- \frac {1}{c}} \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} + \frac {4 \sqrt {- \frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} + \frac {2 \sqrt {\frac {1}{c}} \log {\left (x - \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} - \frac {3 \sqrt {\frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} & \text {for}\: c \neq 0 \\0 & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 83 vs.
\(2 (36) = 72\).
time = 0.40, size = 83, normalized size = 1.89 \begin {gather*} \frac {1}{2} \, {\left (c {\left (\frac {2 \, \sqrt {{\left | c \right |}} \arctan \left (x \sqrt {{\left | c \right |}}\right )}{c^{2}} - \frac {\sqrt {{\left | c \right |}} \log \left ({\left | x + \frac {1}{\sqrt {{\left | c \right |}}} \right |}\right )}{c^{2}} + \frac {\sqrt {{\left | c \right |}} \log \left ({\left | x - \frac {1}{\sqrt {{\left | c \right |}}} \right |}\right )}{c^{2}}\right )} + x \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right )\right )} b + a x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.79, size = 55, normalized size = 1.25 \begin {gather*} a\,x+\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\right )}{\sqrt {c}}+\frac {b\,x\,\ln \left (c\,x^2+1\right )}{2}-\frac {b\,x\,\ln \left (1-c\,x^2\right )}{2}+\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{\sqrt {c}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________